package com.iwop.moto.service.impl;

import com.iwop.moto.model.SuperRecordModel;
import com.iwop.moto.service.BaseService;
import com.iwop.moto.service.ShoppingService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author liuwb 2016-07-29 14:01
 */
@Service
public class ShoppingServiceImpl extends BaseService implements ShoppingService {

    /**
     * 购物车 - 新增
     */
    public void insertShopping(SuperRecordModel SRModel){
        getSqlSession().insert("MShoppingMapper.insertShopping",SRModel);
    }

    /**
     * 购物车 - 列表
     */
    public List<SuperRecordModel> findShoppingList(SuperRecordModel SRModel){
        return getSqlSession().selectList("MShoppingMapper.findShoppingList",SRModel);
    }

    /**
     * 购物车 - 删除
     */
    public void deleteShopping(SuperRecordModel SRModel){
        getSqlSession().delete("MShoppingMapper.deleteShopping",SRModel);
    }

    /**
     * 购物车 - 修改数量
     */
    public void updateShoppingNums(SuperRecordModel SRModel){
        getSqlSession().update("MShoppingMapper.updateShoppingNums",SRModel);
    }


}
